﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Streambolics
{
    public class IniKey : StringPersistentValue
    {
        private string _Name;
        private IniSection _Section;
        private const string Nonexistent = "{8548C0D5-BC88-47f7-8CDA-75A7D5CE5410}";


        internal IniKey (IniSection aSection, string aName)
        {
            _Section = aSection;
            _Name = aName;
        }

        public override void SetValue (string aValue)
        {
            _Section.SetValue (_Name, aValue);
        }

        public override bool GetValue (ref string aValue)
        {
            aValue = _Section.GetValue (_Name, Nonexistent);
            return aValue != Nonexistent;
        }

    }
}
